import { Object2Bson } from "../../Decorator/Decorator";
import { Entity } from "../Module/Entity/Entity";

export class MongoHelper {

    public static FromBson<T extends Entity>(entity: T, object: any) {
        let bson = Object2Bson(object);
        for (let key in bson) {
            entity[key] = bson[key];
        }
    }

}